package com.juzi.wopu.query;

import org.apache.commons.lang3.StringUtils;

public class SysProductQuery extends BaseQuery{
	
	private String sName;
	
	private Long iType;
	
	private Long iTypeSub;

	public SysProductQuery() {
		super("SysProduct");
	}
	
	@Override
	protected void addWhere() {
		if (StringUtils.isNotBlank(sName)) {
			AddWhere("o.sName like ?", "%" + sName + "%");
		}
		
		if(iType !=null && iType != -1L){
			  AddWhere("o.sysCode.iId=?", iType);
		  }
		
		if (iTypeSub!=null) {
			AddWhere("o.iTypeSub = ?", iTypeSub);
		}
	}

	public String getsName() {
		return sName;
	}

	public void setsName(String sName) {
		this.sName = sName;
	}
	
	public String getSName() {
		return sName;
	}

	public void setSName(String sName) {
		this.sName = sName;
	}

	public Long getiType() {
		return iType;
	}

	public void setiType(Long iType) {
		this.iType = iType;
	}
	
	public Long getIType() {
		return iType;
	}

	public void setIType(Long iType) {
		this.iType = iType;
	}

	public Long getiTypeSub() {
		return iTypeSub;
	}

	public void setiTypeSub(Long iTypeSub) {
		this.iTypeSub = iTypeSub;
	}

	public Long getITypeSub() {
		return iTypeSub;
	}

	public void setITypeSub(Long iTypeSub) {
		this.iTypeSub = iTypeSub;
	}
}
